<?php echo $header; ?>
<div id="ja-container" class="wrap ja-r1">
		<div class="main">	
			<div class="ja-rs2-top">
				<div class="ja-rs2-tl">&nbsp;</div>
				<div class="ja-rs2-tr">&nbsp;</div>
			</div>
			
			<div class="ja-rs2-mid">
				<div class="ja-rs2-ml">
					<div class="ja-rs2-mr clearfix">
						<div id="ja-mainbody" style="width:70%">
						<div id="ja-main" style="width:100%">
								<div class="inner clearfix">	
									<div id="ja-contentwrap" class="ja-r1">
			<!-- CONTENT -->
			<div class="ja-mass ja-mass-top clearfix">
	
			<div class="ja-rs3-top"><div class="ja-rs3-tl">&nbsp;</div><div class="ja-rs3-tr">&nbsp;</div></div>
		
				<div class="ja-rs3-mid"><div class="ja-rs3-ml"><div class="ja-rs3-mr">
					<div class="ja-moduletable moduletable title-orange  clearfix">
						<?php if(!$root_name){?>
						<h3><span><strong class="first-word"><strong><?php echo $heading_title; ?></strong></strong></span></h3>
						<?php }else{?>	
						<h3><span><strong class="first-word"><strong><a href="<?php echo $root_href;?>"><?php echo $root_name;?></a></strong></strong><?php echo $heading_title; ?></span></h3>
						<?php }?>	
							<div class="ja-box-ct clearfix" style="padding-left:20px;">
			<div id="list-art">
				<?php if ($cats) { ?>
		       
		        <?php for ($i = 0; $i < sizeof($cats); $i++) { ?>
				<div class="news-category">
		            <div class="c1">
		                <div class="c11">
		                    <a href='<?php echo $cats[$i]['href'];?>'><?php echo $cats[$i]['name'];?></a></div>
		                <div class="c12">
		                    &nbsp;</div>
		                <div class="c13">
		                    &nbsp;</div>
		            </div>
		                    
				<div class="news-content">
					<?php if(isset($articles[$cats[$i]['cat_id']])){?>
					<?php for ($j = 0; $j < sizeof($articles[$cats[$i]['cat_id']]); $j++) { ?>					
				    <?php if($j==0){ 
						if(sizeof($articles[$cats[$i]['cat_id']])>1){ ?> 
							<div class="news-first" style="width:320px;">
						<?php }else{?>
							<div class="news-first" style="width:620px;">
						<?php }?>
				        <ul>
				            <li style="background-image: none;"><a href="<?php echo $articles[$cats[$i]['cat_id']][$j]['href'];?>" class="first-tiltle first-right"><?php echo $articles[$cats[$i]['cat_id']][$j]['name'];?></a>
				            	<div style="clear:both;width:320px;"></div>
								<a href="<?php echo $articles[$cats[$i]['cat_id']][$j]['href'];?>" class="first-tiltle first-left">
								<img src="<?php echo $articles[$cats[$i]['cat_id']][$j]['thumb'];?>" alt="<?php echo $articles[$cats[$i]['cat_id']][$j]['name'];?>" class="first-img" />
								</a>
								<div class="date2" style="font-size:10px;"><?php echo $articles[$cats[$i]['cat_id']][$j]['date_available'];?></div>
				                 <div style="font-size:13px;"><?php echo $articles[$cats[$i]['cat_id']][$j]['meta_description'];?></div>
				            </li>
				        </ul>
				    </div>
				    <div class="news-list">
				    <ul>
				    <?php }?>
				    
				    	<?php if($j!=0){?>
				            <li class="sub-list">
								<a href="<?php echo $articles[$cats[$i]['cat_id']][$j]['href'];?>">
									<?php echo $articles[$cats[$i]['cat_id']][$j]['name'];?>
								</a>
							</li>			            
				         <?php }?>
				        
				    
				    <?php }?>
				    	</ul>
				    </div>
				    <?php }?>
				</div>		
		    </div>
		    <?php }?>
		    	 <div class="pagination"><?php echo $pagination; ?></div>
		    <?php }else{?>
		    <div class="news-category" style="width:100%;">
		    	<div class="news-content">
		    		<?php if(isset($articles)){?>
		    			<div class="news-first" style="width:620px;margin-bottom:10px;">
		    			<ul>
						<?php for ($j = 0; $j < sizeof($articles); $j++) { ?>
							<?php if($j==0){?>
								<li style="background-image: none;border-bottom: 3px solid #E9E9EB;margin-bottom: 10px;"><a href="<?php echo $articles[$j]['href'];?>" class="first-tiltle" style="font-size:15px;color:#E7AC8B;"><?php echo $articles[$j]['name'];?></a>
								<a href="<?php echo $articles[$j]['href'];?>" class="first-tiltle" style="text-align: left;">
								<img style="width: 320px;height:250px;" src="<?php echo $articles[$j]['image'];?>" alt="<?php echo $articles[$j]['name'];?>" class="first-img" />
								</a>
								<div class="date3"><?php echo $articles[$j]['date_available'];?></div>
				                <div style="font-size:13px;"><?php echo $articles[$j]['meta_description'];?></div>
				             	</li>		
							<?php }else{?>
								<li style="background-image: none;"><a href="<?php echo $articles[$j]['href'];?>" class="first-tiltle"><?php echo $articles[$j]['name'];?></a>
								<a href="<?php echo $articles[$j]['href'];?>" class="first-tiltle" style="text-align: left;">
								<img src="<?php echo $articles[$j]['thumb'];?>" alt="<?php echo $articles[$j]['name'];?>" class="first-img" />
								</a>
								<div class="date2"><?php echo $articles[$j]['date_available'];?></div>
				                <div style="font-size:13px;"><?php echo $articles[$j]['meta_description'];?></div>
				             	</li>
				             <?php }?>
						<?php }?>
						</ul></div></div>
					<?php }else{?>
						<div class="content"><?php echo $text_error; ?></div>
					<?php }?>	
		    	</div>
		    	
		    <?php }?>
		    </div>
		   </div></div></div></div></div>
		
					<div class="ja-rs3-bot"><div class="ja-rs3-bl">&nbsp;</div><div class="ja-rs3-br">&nbsp;</div></div>
					</div>
					</div>
				</div>
			</div>
	<!-- //CONTENT -->
			</div>
		<!-- RIGHT COLUMN-->
		<?php echo $column_right; ?>
		<!-- END RIGHT COLUMN--> 
	</div></div></div>
	</div>
	</div>
<?php echo $footer; ?> 